Repository navigation
fix(web): stop offering to move review sessions off a quiet runner - #680
Merged
Merged
Conversation
The stall notice offered "Move to another runner" to whoever manages the
session, review agents' sessions included, which the ⋯ menu leaves out
and POST /sessions/{id}/move refuses: the click failed with a toast
about review agents taking no messages. TurnTranscript now takes
canMove, which the session page gives its owner unless it is a review.
kalaspuff
pushed a commit
that referenced
this pull request
Dec 3, 2026
## Summary Since #669, a runner that declined a session for any reason but its driver went on the session's list of runners that couldn't start it. That includes the two declines that only last a moment: "the host is at capacity" and the low-disk decline. FleetDO learns a runner's free slots and disk only from heartbeats, 15 seconds apart, so it can send a session to a runner that has just filled up. In a workspace with one runner, that session then failed at once ("Couldn't start on studio: the host is at capacity"). Before #669 it tried again after a backoff, and `Wait::rules_out` already treats busy and low-disk runners as ones that may take a session later. Now `schedule::passes` recognises those two declines by the host's words, and FleetDO handles them as it handles a decline for the driver. The runner isn't added to the list, and the session goes back to the queue, "Retrying: …", with the same backoff. `driver_declined` stays set only for the driver, so a resume still goes back to its sandbox as before. The host now builds both messages from `schedule::AT_CAPACITY` and `schedule::low_on_disk`, so its wording and the check that matches it can't drift apart. Every host version already sends these strings, so the protocol doesn't change. The architecture doc's "Sessions a runner can't start" and ADR 0107 now say so. Verified with a new domain test (`passes` is true for these two declines and false for the image, size, retiring and pull ones), the host's low-disk test, which now also checks `passes` on its refusal, FleetDO's tests in Node, and Clippy native and for wasm. Nothing reproduced the race end to end in `cargo xtask dev`. ## Worth confirming - **Decision:** a full or low-disk decline still counts towards the session's five attempts, as before #669. If FleetDO kept sending the session to runners that declined it for room, it would fail after about 75 seconds of backoff. Normally the next heartbeat shows the runner busy first, and the session then waits without using attempts. - #680 Refs #669 [fctl session](https://app.fctl.sh/s/ses_01M8YGVKC8CD8CGJ4FXTRRN7EG) <!-- FCTL_REVIEW_SUMMARY --> --- > [!NOTE] > **Medium risk.** It changes how the control plane handles every session a runner declines, though only the declines for a full host or low disk; a wrong text match would retry sessions that should move or fail. > > **What it does.** When a runner declines a session because it is at capacity or low on disk, the control plane now queues it again after a backoff, without counting that runner as one that couldn't start it. Before, such a decline marked the runner as tried, so a session in a workspace with one runner failed. The host's two decline texts now live in `fctl_domain::schedule`, and `passes` matches them in the control plane. > > **Match on decline text.** The control plane recognises the decline by comparing the host's error text (`AT_CAPACITY`, and a `min_free_disk_gb in its host.toml` suffix), not by a flag in the protocol. > > <sub>[fctl review](https://app.fctl.sh/s/ses_01M8YH5TQRYCKJ3FRZXT0E9K59)'s first look at [`0d3fb93`](0d3fb93) · 5 files, +78 −19 · [Review agent settings](https://app.fctl.sh/p/fctl?tab=reviews)</sub> <!-- /FCTL_REVIEW_SUMMARY --> Co-authored-by: fctl-sh[bot] <343971779+fctl-sh[bot]@users.noreply.github.com>
kalaspuff
approved these changes
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since #678, the notice the session page shows when a runner's work isn't coming through offers Move to another runner to the session's owner, review agents' sessions included. The ⋯ menu leaves the item out for reviews, and
POST /sessions/{id}/moverefuses them. So the click failed with an unrelated toast ("Review agents take no messages…"). The transcript now takes its owncanMove, which the session page sets for the owner unless the session is a review.canManagestill governs everything else it did.Verified with a new transcript test: the move appears with
canMoveand not without it, for a reader who still manages the session. The test fails without the fix.npm run checkand the web app's whole test suite pass. There is no screenshot: the only visible change is that the button no longer appears on a review session's stall notice, and other sessions' notices look as before.Refs #678
fctl session
Note
Low risk. A small web-only change that hides one button for review agent sessions; nothing else reads the new prop.
What it does. Review agent sessions can't be moved to another runner, but the stall notice still offered "Move to another runner" to their owner. This adds a
canMoveprop toTurnTranscript, set in the session page toisOwner && !session.review, and uses it instead ofcanManagefor the move button. A test covers both cases.fctl review's first look at
f77e613· 3 files, +21 −2 · Review agent settings